package com.future.mayi.utils;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import com.future.mayi.activity.LoginActivity;
import com.future.mayi.app.App;

/**
 * Created by Administrator on 2018/3/15.
 */

public class ClickUtils {

    /**
     *
     * @param mContext
     * @param isIntent 是否跳出
     * @return
     */
    public static boolean isNoLogin(Context mContext, boolean isIntent) {
        if (TextUtils.isEmpty(App.getUid()) || TextUtils.isEmpty(App.getToken(mContext))) {
            if (isIntent) {
                Intent loginActivityIntent = new Intent();
                loginActivityIntent.setClass(mContext, LoginActivity.class);
                mContext.startActivity(loginActivityIntent);
            }
            return true;
        }
        return false;
    }
}
